From 337982738df092b74b6d8350e7534990c004efeb Mon Sep 17 00:00:00 2001 From: Jody Goldberg Date: Wed, 16 Jan 2002 06:02:41 +0000 Subject: [PATCH] set_boxed will copy the color and will use a mem_chunk to do it. Avoid an 2002-01-13 Jody Goldberg * gtk/gtktexttag.c (get_color_arg) : set_boxed will copy the color and will use a mem_chunk to do it. Avoid an unnecessary copy, a leak, and confusion. --- ChangeLog | 6 ++++++ ChangeLog.pre-2-0 | 6 ++++++ ChangeLog.pre-2-10 | 6 ++++++ ChangeLog.pre-2-2 | 6 ++++++ ChangeLog.pre-2-4 | 6 ++++++ ChangeLog.pre-2-6 | 6 ++++++ ChangeLog.pre-2-8 | 6 ++++++ gtk/gtktexttag.c | 6 +----- 8 files changed, 43 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index b786328362..3ade382500 100644 --- a/ChangeLog +++ b/ChangeLog @@ -92,6 +92,12 @@ Mon Jan 14 16:35:58 2002 Owen Taylor * gtk/gtkwindow.c (gtk_window_move_resize): Unset initial_pos_set after the first configure request. +2002-01-13 Jody Goldberg + + * gtk/gtktexttag.c (get_color_arg) : set_boxed will copy the color + and will use a mem_chunk to do it. Avoid an unnecessary copy, a + leak, and confusion. + Sun Jan 13 23:23:22 2002 Owen Taylor * gtk/gtkwindow.c (gtk_window_compute_hints): Fix problem where diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index b786328362..3ade382500 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -92,6 +92,12 @@ Mon Jan 14 16:35:58 2002 Owen Taylor * gtk/gtkwindow.c (gtk_window_move_resize): Unset initial_pos_set after the first configure request. +2002-01-13 Jody Goldberg + + * gtk/gtktexttag.c (get_color_arg) : set_boxed will copy the color + and will use a mem_chunk to do it. Avoid an unnecessary copy, a + leak, and confusion. + Sun Jan 13 23:23:22 2002 Owen Taylor * gtk/gtkwindow.c (gtk_window_compute_hints): Fix problem where diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index b786328362..3ade382500 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -92,6 +92,12 @@ Mon Jan 14 16:35:58 2002 Owen Taylor * gtk/gtkwindow.c (gtk_window_move_resize): Unset initial_pos_set after the first configure request. +2002-01-13 Jody Goldberg + + * gtk/gtktexttag.c (get_color_arg) : set_boxed will copy the color + and will use a mem_chunk to do it. Avoid an unnecessary copy, a + leak, and confusion. + Sun Jan 13 23:23:22 2002 Owen Taylor * gtk/gtkwindow.c (gtk_window_compute_hints): Fix problem where diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index b786328362..3ade382500 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -92,6 +92,12 @@ Mon Jan 14 16:35:58 2002 Owen Taylor * gtk/gtkwindow.c (gtk_window_move_resize): Unset initial_pos_set after the first configure request. +2002-01-13 Jody Goldberg + + * gtk/gtktexttag.c (get_color_arg) : set_boxed will copy the color + and will use a mem_chunk to do it. Avoid an unnecessary copy, a + leak, and confusion. + Sun Jan 13 23:23:22 2002 Owen Taylor * gtk/gtkwindow.c (gtk_window_compute_hints): Fix problem where diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index b786328362..3ade382500 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -92,6 +92,12 @@ Mon Jan 14 16:35:58 2002 Owen Taylor * gtk/gtkwindow.c (gtk_window_move_resize): Unset initial_pos_set after the first configure request. +2002-01-13 Jody Goldberg + + * gtk/gtktexttag.c (get_color_arg) : set_boxed will copy the color + and will use a mem_chunk to do it. Avoid an unnecessary copy, a + leak, and confusion. + Sun Jan 13 23:23:22 2002 Owen Taylor * gtk/gtkwindow.c (gtk_window_compute_hints): Fix problem where diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index b786328362..3ade382500 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -92,6 +92,12 @@ Mon Jan 14 16:35:58 2002 Owen Taylor * gtk/gtkwindow.c (gtk_window_move_resize): Unset initial_pos_set after the first configure request. +2002-01-13 Jody Goldberg + + * gtk/gtktexttag.c (get_color_arg) : set_boxed will copy the color + and will use a mem_chunk to do it. Avoid an unnecessary copy, a + leak, and confusion. + Sun Jan 13 23:23:22 2002 Owen Taylor * gtk/gtkwindow.c (gtk_window_compute_hints): Fix problem where diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index b786328362..3ade382500 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -92,6 +92,12 @@ Mon Jan 14 16:35:58 2002 Owen Taylor * gtk/gtkwindow.c (gtk_window_move_resize): Unset initial_pos_set after the first configure request. +2002-01-13 Jody Goldberg + + * gtk/gtktexttag.c (get_color_arg) : set_boxed will copy the color + and will use a mem_chunk to do it. Avoid an unnecessary copy, a + leak, and confusion. + Sun Jan 13 23:23:22 2002 Owen Taylor * gtk/gtkwindow.c (gtk_window_compute_hints): Fix problem where diff --git a/gtk/gtktexttag.c b/gtk/gtktexttag.c index 8899451c00..7000d88b55 100644 --- a/gtk/gtktexttag.c +++ b/gtk/gtktexttag.c @@ -1358,12 +1358,8 @@ gtk_text_tag_set_property (GObject *object, static void get_color_arg (GValue *value, GdkColor *orig) { - GdkColor *color; - - color = g_new (GdkColor, 1); - *color = *orig; g_value_init (value, GDK_TYPE_COLOR); - g_value_set_boxed (value, color); + g_value_set_boxed (value, orig); } static void -- 2.30.2